package com.qingcheng.dao;

import com.qingcheng.pojo.goods.TbSpu;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

public interface TbSpuMapper extends Mapper<TbSpu> {

    /**
     * @return 得到已审核商品的统计数量
     */
    @Select("SELECT COUNT(*)FROM tb_spu WHERE  `status`  = 1")
    Long statusCount();

    /**
     * @return 得到已上架的商品统计
     */
    @Select("SELECT COUNT(*)FROM tb_spu WHERE `is_marketable` = 1 ")
    Long marketableCount();

}